Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

409
Visualizações
Prometheus operator AlertmanagerConfig unknown field "webhook_configs"

After applying these manifests https://github.com/prometheus-operator/kube-prometheus/blob/main/kustomization.yaml I want to create AlertManager webhook:

apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
  name: custom
spec:
  route:
    receiver: custom
    groupBy: ['job']
    groupWait: 30s
    groupInterval: 5m
    repeatInterval: 12h
  receivers:
    - name: custom
      webhook_configs:
        - send_resolved: true
          url: https://example.com

getting an error:

error: error validating "alertmanagerconfig.yaml": error validating data: ValidationError(AlertmanagerConfig.spec.receivers[0]): unknown field "webhook_configs" in com.coreos.monitoring.v1alpha1.AlertmanagerConfig.spec.receivers; if you choose to ignore these errors, turn validation off with --validate=false

How to fix that?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Taking this link as reference,

apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
  name: custom
spec:
  receivers:
    - name: custom
      webhookConfigs:
        - send_resolved: true
          url: https://example.com

You can also check field using kubectl explain command

kubectl explain alertmanagerconfig.spec.receivers

over 4 years ago · Santiago Trujillo Relatório

0

The problem is that you are using the configuration reference for the actual AlertManager application and not the one for the Kubernetes Custom Resource provided by the Prometheus Operator.

The Prometheus Operator takes the configuration provided in the form of custom resources like AlertManagerConfig and converts them into actual AlertManager config and updates the configuration file the application uses. That is a part of the reason why you use an operator in the first place. It makes these things convenient for you.

So the actual configuration reference you should be using here is this. This part of the Prometheus Operator's github readme lists down the available custom resources you can use with it.

over 4 years ago · Santiago Trujillo Relatório

0

In addition to the answer from Kiran (Thanks!) one small correction - it is actually sendResolved and not send_resolved.

apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
  name: custom
spec:
  receivers:
    - name: custom
      webhookConfigs:
        - sendResolved: true
          url: https://example.com
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda